Assessment of episodes of drug use and psychosocial stress is complicated by the fact that each is often transient and difficult to recall accurately. Assessment of their causal connections with one another, and of their genetic and environmental determinants, is complicated by the complexity of the causal connections and by the elusive nature of what constitutes the environment. We are continuing our work to study the factors that influence drug use through collection of subjective, psychological and physiological measures, drug use and family histories, and environmental variables, including data about our participants neighborhoods and workplaces. In this project, we are assessing drug use and psychosocial stress in near-real time through ecological momentary assessment (EMA), in which participants use handheld electronic diaries to record events as they occur and to report recent or ongoing events in response to randomly timed prompts throughout the day. We are also maintaining real-time records of where the reported events occur by collecting GPS data to track their whereabouts with a spatial resolution of several meters. We use these data collectively in a method we are calling geographical momentary assessment (GMA). Our goal with GMA has little to do with knowing the specific Baltimore locations where drug-related behaviors occur, and everything to do with gaining generalizable knowledge about how activity spaces (the spaces in which daily activities occur) are associated with such behaviors and their precipitants. We are currently analyzing GMA data from approximately 300 patients in opioid-agonist maintenance many of whom continue to use opioids and cocaine. Stress can be validly assessed live or by a summary evaluation of the very recent past. Using smartphone-based ecological momentary assessment (EMA) combined with end-of-day stressful events and drug use entries, we assessed the association between daily hassles, stressful events and use of opioids and cocaine, in opioid- and cocaine-using men and women. For up to 16 weeks, 161 outpatients in opioid-agonist treatment who reported cigarette smoking carried smartphones on which they reported stressful events and drug use and completed an end-of-day questionnaire to report hassles encountered throughout the day, current perceived stress, cigarettes/day, and current mood. We compared end-of-day responses on days with and without stressful events and drug use reports and on days when thrice-weekly urine drug screens indicated opioid or cocaine use or abstinence. Participants (N=161) made 11,544 end-of-day entries; EMA SEs were reported on 861 (7.5%) days, and DUs on 1685 (14.6%) days. The most frequently reported hassles in end-of-day entries were not enough money (31.4% of daily reports) and maintaining abstinence (18.7%). Total end-of-day hassles showed small but statistically significant associations with EMA stress events , drug use events, and urine positive opioid and cocaine results. Men and women had similar rates (mean/day (SD)) of hassles. Daily hassles, reported at the end of the day, are associated with both same-day stressful events and drug use. Monitoring hassles and devising specific coping strategies might be useful therapeutic targets. One of our other mHealth activities is evaluation of the effects of drug use on circadian rhythm and sleep. We are currently analyzing data from a mobile device that monitors light exposure and activity to assess circadian disruption and its relation to treatment outcome. We are also conducting a study of sleep in opioid-maintained outpatients with and without chronic pain.